<?php
require("cfg.php");
require("function.php");
$lists="";
if (isset($_POST['lists'])) {
	if ($_POST['lists']) {
		$lists=$_POST['lists'];
	}
}
if ($lists) {
	$list_to_delete=explode('&',$lists);
}
for($i=0;$i<count($list_to_delete)-1;$i++){
	$sql="DELETE FROM `user_list` WHERE `id` = '$list_to_delete[$i]' AND `user_name` = 'test_user';";
	mysql_query($sql);
	$sql=$sql="DELETE FROM `user_list_record` WHERE `list_id` = ''$list_to_delete[$i]' AND `user_name` = 'test_user';";
	mysql_query($sql);
}

?>